package com.zhentao.model.pojo.car.enums;

public enum BatteryCapacity {
    LOW_CAPACITY(1,"40kWh以下"),
    MIDDLE_CAPACITY(2,"40kWh-70kWh"),
    HIGH_CAPACITY(3,"70kWh以上");
    int code;
    String text;

    BatteryCapacity(int code, String text){
        this.code = code;
        this.text = text;
    }

    public int getCode() {
        return code;
    }

    public String getBCText() {
        return text;
    }
    public static String getBatteryCapacity(int code){
       switch (code){
           case 1:
               return LOW_CAPACITY.getBCText();
           case 2:
               return MIDDLE_CAPACITY.getBCText();
           case 3:
               return HIGH_CAPACITY.getBCText();
           default:
               return null;
       }
    }

}
